DAST = DataStructures/
OPER = Operations/
COMPS = computations/
BIN = ../bin/


#g++ -I/home/andersx/programs/openbabel/include/openbabel-2.0 
#-L/home/andersx/programs/openbabel/lib -lopenbabel OBtest.cpp -o OBtest
#in the LINK_COMPILER after -std=c++0x: -ldl -rdynamic

OBJECTS = ${DAST}Atom.o ${DAST}Molecule.o ${OPER}Operation.o ${OPER}C_Operation.o ${OPER}S_Operation.o \
${COMPS}permutations.o ${COMPS}PermutationsGroup.o

BABEL_I = /home/or/Tools/openbabel/include/openbabel-2.0
BABEL_L = /home/or/Tools/openbabel/lib

COMPILE = g++ -Wall -g -c -std=c++0x -I${BABEL_I}
LINK_COMPILE = g++ -Wall -g -std=c++0x -I${BABEL_I} -L${BABEL_L} -lopenbabel ${OBJECTS}   

all: orMain 

orMain: ${OBJECTS} orMain.cpp
	${LINK_COMPILE} orMain.cpp -o orMain
	
${COMPS}permutations.o: ${COMPS}permutations.h ${COMPS}permutations.cpp
	${COMPILE} ${COMPS}permutations.cpp -o ${COMPS}permutations.o

${COMPS}PermutationsGroup.o: ${COMPS}PermutationsGroup.h ${COMPS}PermutationsGroup.cpp
	${COMPILE} ${COMPS}PermutationsGroup.cpp -o ${COMPS}PermutationsGroup.o

${DAST}Molecule.o: ${DAST}Molecule.h ${DAST}Molecule.cpp
	${COMPILE} ${DAST}Molecule.cpp -o ${DAST}Molecule.o

${DAST}Atom.o: ${DAST}Atom.h ${DAST}Atom.cpp
	${COMPILE} ${DAST}Atom.cpp -o ${DAST}Atom.o
	
${OPER}Operation.o: ${OPER}Operation.h ${OPER}Operation.cpp
	${COMPILE} ${OPER}Operation.cpp -o ${OPER}Operation.o
	
${OPER}C_Operation.o: ${OPER}Operation.h ${OPER}C_Operation.cpp
	${COMPILE} ${OPER}C_Operation.cpp -o ${OPER}C_Operation.o
	
${OPER}S_Operation.o: ${OPER}Operation.h ${OPER}S_Operation.cpp
	${COMPILE} ${OPER}S_Operation.cpp -o ${OPER}S_Operation.o

clean:
	rm -rf ${OBJECTS} *.o orMain
	
#path:
#	export PATH=$PATH:/home/or/Tools/openbabel/bin
#	export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/or/Tools/openbabel/lib

	
.PHONY: all clean